<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../css/theme0.css" rel="stylesheet" type="text/css" />
<title>审核首页</title>
</head>
<body>
<div id="main">
    <%@ include file="../Header.jsp" %>
    <div id="middle">
        <c:import url="../NavigationAudit.jsp"></c:import>
        <div id="center-column">
            <div class="top-bar">
                <a href="../SystemManagement/logoutAction.action" class="button">退出</a>
                <h1>审核首页</h1>
                <div class="breadcrumbs">首页</div>
            </div><br />
            <div class="select-bar">
                <label><input type="text" name="textfield" /></label>
                <label><input type="submit" name="Submit" value="Search" /></label>
            </div>
            
            <!-- 这里写页面内容 -->
            <table class="listing form" cellpadding="0" cellspacing="0">
                <c:set var="i" value="0"></c:set>
                <tr>
                    <th class="full" colspan="6">部门信息审核</th>
                </tr>
                <tr>
                    <td class="first"><strong>序号</strong></td>
                    <td><strong>审核</strong></td>
                    <td><strong>部门名称</strong></td>
                    <td><strong>部门人数</strong></td>
                    <td><strong>部门经理</strong></td>
                    <td class="last"><strong>备注</strong></td>
                </tr>
                <c:forEach var="dept" items="${ depts }">
                    <c:set var="i" value="${ i + 1 }"></c:set>
                    <tr>
                        <td class="first"><strong><c:out value="${ i }" /></strong></td>
                        <td>
	                        <c:forEach var="t" items="${ deptmgts }">
	                            <c:if test="${ t.departmentId == dept.departmentId}">
	                                <c:set var="deptmgt" value="${ t }"></c:set>
	                            </c:if>
	                        </c:forEach>
	                        <c:forEach var="t" items="${ humans }">
	                            <c:if test="${ t.humanId == dept.managerId}">
	                                <c:set var="manager" value="${ t }"></c:set>
	                            </c:if>
	                        </c:forEach>
	                        <c:choose>
	                            <c:when test="${ deptmgt.audit == 'audited' }">
	                                <a href="deptAuditAction.action?deptId=${ deptmgt.departmentId }&audit=unaudited" onclick="return window.confirm('确定要将这条信息设置为未通过审核吗？');">取消通过审核</a>
	                            </c:when>
	                            <c:otherwise>
	                                <a href="deptAuditAction.action?deptId=${ deptmgt.departmentId }&audit=audited" onclick="return window.confirm('确定要将这条信息设置为已通过审核吗？');">通过审核</a>
	                            </c:otherwise>
	                        </c:choose>
                        </td>
                        <td><c:out value="${ dept.departmentName }" /></td>
                        <td><c:out value="${ dept.capacity }" /></td>
                        <td><c:out value="${ manager.humanName }" /></td>
                        <!--<td class="last"><c:out value="${ dept.remark }" /></td>-->
                        <td class="last"><c:out value="${ deptmgt.remark }" /></td>
                    </tr>
                    <c:remove var="deptmgt"/>
                </c:forEach>
            </table>
            <br />
            <table class="listing form" cellpadding="0" cellspacing="0">
                <c:set var="i" value="0"></c:set>
                <tr>
                    <th class="full" colspan="6">职位信息审核</th>
                </tr>
                <tr>
                    <td class="first"><strong>序号</strong></td>
                    <td><strong>审核</strong></td>
                    <td><strong>职位名称</strong></td>
                    <td><strong>薪酬标准</strong></td>
                    <td class="last"><strong>备注</strong></td>
                </tr>
                <c:forEach var="position" items="${ positions }">
                    <c:set var="i" value="${ i + 1 }"></c:set>
                    <tr>
                        <td class="first"><strong><c:out value="${ i }" /></strong></td>
                        <td>
                            <c:forEach var="t" items="${ positionmgts }">
                                <c:if test="${ t.positionId == position.positionId}">
                                    <c:set var="positionmgt" value="${ t }"></c:set>
                                </c:if>
                            </c:forEach>
                            <c:forEach var="t" items="${ salarystandards }">
                                <c:if test="${ t.salarystandardId == position.salaryStandardId}">
                                    <c:set var="salarystandard" value="${ t }"></c:set>
                                </c:if>
                            </c:forEach>
                            <c:choose>
                                <c:when test="${ positionmgt.audit == 'audited' }">
                                    <a href="positionAuditAction.action?positionId=${ positionmgt.positionId }&audit=unaudited" onclick="return window.confirm('确定要将这条信息设置为未通过审核吗？');">取消通过审核</a>
                                </c:when>
                                <c:otherwise>
                                    <a href="positionAuditAction.action?positionId=${ positionmgt.positionId }&audit=audited" onclick="return window.confirm('确定要将这条信息设置为已通过审核吗？');">通过审核</a>
                                </c:otherwise>
                            </c:choose>
                        </td>
                        <td><c:out value="${ position.positionName }" /></td>
                        <td><c:out value="${ salarystandard.salarystandardName }" /></td>
                        <td class="last"><c:out value="${ position.remark }" /></td>
                        <c:remove var="positionmgt"/>
                    </tr>
                </c:forEach>
            </table>
            <br />
            <table class="listing form" cellpadding="0" cellspacing="0">
                <c:set var="i" value="0"></c:set>
                <tr>
                    <th class="full" colspan="6">职称信息审核</th>
                </tr>
                <tr>
                    <td class="first"><strong>序号</strong></td>
                    <td><strong>审核</strong></td>
                    <td><strong>职称名称</strong></td>
                    <td><strong>薪酬标准</strong></td>
                    <td class="last"><strong>备注</strong></td>
                </tr>
                <c:forEach var="title" items="${ titles }">
                    <c:set var="i" value="${ i + 1 }"></c:set>
                    <tr>
                        <td class="first"><strong><c:out value="${ i }" /></strong></td>
                        <td>
                            <c:forEach var="t" items="${ titlemgts }">
                                <c:if test="${ t.titleId == title.titleId}">
                                    <c:set var="titlemgt" value="${ t }"></c:set>
                                </c:if>
                            </c:forEach>
                            <c:forEach var="t" items="${ salarystandards }">
                                <c:if test="${ t.salarystandardId == title.salaryStandardId}">
                                    <c:set var="salarystandard" value="${ t }"></c:set>
                                </c:if>
                            </c:forEach>
                            <c:choose>
                                <c:when test="${ titlemgt.audit == 'audited' }">
                                    <a href="titleAuditAction.action?titleId=${ titlemgt.titleId }&audit=unaudited" onclick="return window.confirm('确定要将这条信息设置为未通过审核吗？');">取消通过审核</a>
                                </c:when>
                                <c:otherwise>
                                    <a href="titleAuditAction.action?titleId=${ titlemgt.titleId }&audit=audited" onclick="return window.confirm('确定要将这条信息设置为已通过审核吗？');">通过审核</a>
                                </c:otherwise>
                            </c:choose>
                        </td>
                        <td><c:out value="${ title.titleName }" /></td>
                        <td><c:out value="${ salarystandard.salarystandardName }" /></td>
                        <td class="last"><c:out value="${ title.remark }" /></td>
                        <c:remove var="titlemgt"/>
                    </tr>
                </c:forEach>
            </table>
            <!--<div id="AuditSalarystandard">
                <div id="AuditSalarystandardHeader">薪酬标准信息审核</div>
                <c:set var="i" value="0"></c:set>
                <c:forEach var="salarystandard" items="${ salarystandards }">
                    <div id="AuditSalarystandardInfo">
                        <c:set var="i" value="${ i + 1 }"></c:set>
                        <span id="SalarystandardInfoIndex"><c:out value="${ i }"></c:out></span>
                        <c:forEach var="t" items="${ salarystandardmgts }">
                            <c:if test="${ t.salarystandardId == salarystandard.salarystandardId}">
                                <c:set var="salarystandardmgt" value="${ t }"></c:set>
                            </c:if>
                        </c:forEach>
                        <c:forEach var="t" items="${ salarystandards }">
                            <c:if test="${ t.salarystandardId == salarystandard.salarystandardId}">
                                <c:set var="salarystandard" value="${ t }"></c:set>
                            </c:if>
                        </c:forEach>
                        <c:choose>
                            <c:when test="${ salarystandardmgt.audit == 'audited' }">
                                <span id="AuditA">已通过审核 - <a href="salarystandardAuditAction.action?salarystandardId=${ salarystandardmgt.salarystandardId }&audit=unaudited" onclick="return window.confirm('确定要将这条信息设置为未通过审核吗？');">设为未通过</a></span>
                            </c:when>
                            <c:otherwise>
                                <span id="AuditA">未通过审核 - <a href="salarystandardAuditAction.action?salarystandardId=${ salarystandardmgt.salarystandardId }&audit=audited" onclick="return window.confirm('确定要将这条信息设置为已通过审核吗？');">设为已通过</a></span>
                            </c:otherwise>
                        </c:choose>
                        <span id="SalarystandardNameLabel">职称名称：</span><c:out value="${ salarystandard.salarystandardName }"></c:out>
                        <span id="SalarystandardNameLabel">薪酬标准：</span><c:out value="${ salarystandard.salarystandardName }"></c:out>
                        <span id="SalarystandardRemarkLabel">备注：</span><c:out value="${ salarystandard.remark }"></c:out> - <c:out value="${ salarystandardmgt.remark }"></c:out>
                        <c:remove var="salarystandardmgt"/>
                    </div>
                </c:forEach>
            </div>-->
            
        </div>
        <%@ include file="../Toolkit.jsp" %>
    </div>
    <%@ include file="../Footer.jsp" %>
</div>
</body>
</html>